I thought the code below would work to display the contents of one (non-main) column (which is in fact a layout DXL column) in another (layout DXL) column. |
Re: How to display one column in another (layout DXL)?
Very interesting. The following works when I point it to a column displaying a regular attribute when run from the DXL window and also when run as a Layout. If I make that 1st layout column title 'Layout' and make a new layout column 'Layout 2nd' pointing to 'Layout', then it doesn't work. But if I then run the code again from the DXL window, I get printed two copies of the text.
Object o
if (null obj) //-
then o = current
else o = obj
string dispTxt=""
string colTxt
string wantedColumn="Layout 2nd"
Column c
for c in current Module do
{
if (title(c) == wantedColumn)
{
break
}
else
{
c = null
}
}
if (!(null c))
{
colTxt=text(c, o)
dispTxt=colTxt
}
if (null obj) //-
then {print "Null obj: [[" dispTxt "]]\n"}
else display dispTxt
|